load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "edenapi",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {"dependencies": {"sapling-version": {"path": "../version"}}},
        "lib": {"name": "edenapi"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-edenapi",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:async-trait",
        "fbsource//third-party/rust:chrono",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:itertools",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:parking_lot",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:serde_cbor",
        "fbsource//third-party/rust:serde_json",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:url",
        "//eden/scm/lib/async-runtime:async-runtime",
        "//eden/scm/lib/cats:cats",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/edenapi/trait:edenapi_trait",
        "//eden/scm/lib/edenapi/types:edenapi_types",
        "//eden/scm/lib/hg-http:hg-http",
        "//eden/scm/lib/http-client:http-client",
        "//eden/scm/lib/metrics:metrics",
        "//eden/scm/lib/minibytes:minibytes",
        "//eden/scm/lib/pprint:pprint",
        "//eden/scm/lib/progress/model:progress-model",
        "//eden/scm/lib/repo/url:repourl",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/version:rust_version",
    ],
)
